Justification Priority Constants
Glyphs can be assigned justification priorities by the font designer. In general, ATSUI applies justification to glyphs on a line in order of glyph priority, from highest to lowest. If you set the bit specified by the mask constant kJUSTPriorityMask, described in Justification Override Mask Constants, you can supply one of these constants of type JustPCActionType to set a new justification priority for the glyphs within the particular width delta override structure.
The types of justification priorities have names that describe the types of glyphs that typically have those priorities, but you can assign any priority to any glyph. The actual kind of justification that ATSUI applies--for example, kashida or white space--is defined for each glyph by the font. The priority specifies only the order in which glyphs participate in justification.
enum {
kJUSTKashidaPriority = 0,
kJUSTSpacePriority = 1,
kJUSTLetterPriority = 2,
kJUSTNullPriority = 3,
kJUSTPriorityCount = 4
};
typedef UInt16 JustPCActionType;
Constant descriptions
-
kJUSTKashidaPriority
-
The highest priority. Typically used for kashidas (extension bars) in Arabic. Glyphs with this priority are extended or compressed before all other glyphs in the line.
-
kJUSTSpacePriority
-
Typically assigned to whitespace (interword) glyphs. Glyphs with this priority are extended or compressed, usually by the addition or removal of white space, after all glyphs on the line with priority kJUSTKashidaPriority have been extended or compressed to the maximum amount permitted.
-
kJUSTLetterPriority
-
Assigned to all glyphs that do not have kJUSTKashidaPriority or kJUSTSpacePriority. Glyphs with this priority are extended or compressed, typically by the addition or removal of white space, after all glyphs on the line with priority kJUSTSpacePriority have been extended or compressed to the maximum amount permitted.
-
kJUSTNullPriority
-
Available as a priority for glyphs that you want to participate in justification last of all.
-
kJUSTPriorityCount
-
The number of defined justification priorities. You can use this value for range-checking, size allocation, or loop control.
© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)